header.navbar.navbar-expand-lg.navbar-light.bg-light.border-bottom.shadow-sm.fixed-top#main-navbar
    a.navbar-brand.ml-lg-4.mx-auto(href="/")
        notempty(name="$theme_vars.brand_img")
            img(src="{$theme_vars.brand_img|cmf_get_image_url|default=''}" alt="{$theme_vars.brand|default=''}")
            | <else />
            php.
                $var = empty($theme_vars['brand']) ? $site_info['site_name'] : $theme_vars['brand'];
                $siteName = explode('|',$var);
            volist(name="siteName" id="v" key='k')
                span(class="brand-{$k}") {$v}
    button.navbar-toggler(type="button" data-toggle="collapse" data-target="#mainNav" aria-controls="mainNav" aria-expanded="false" aria-label="Toggle navigation")
        span.navbar-toggler-icon
    nav.collapse.navbar-collapse#mainNav.ml-lg-5
        navigation(nav-id="1" root='ul' class="navbar-nav mr-auto" id="" max-level="3")
            php.
                $menu_item = $level > 1 ? 'dropdown-menu-item' : 'nav-item mx-lg-4';
                $dropdown_link = $level > 1 ? 'dropdown-item' : 'nav-link';
            navigationMenu(root="li" class="{$menu_item}")
                a(class="{$dropdown_link}" href="{$menu.href|default=''}" target="{$menu.target|default=''}")
                    i.fa.mr-1(class="{$menu.icon|default='fa-book'}")
                    span {$menu.name|default=''}
            navigationFolder(root="li" class="nav-item dropdown" dropdown="ul" dropdown-class="dropdown-menu")
                a(href="#" class="nav-link dropdown-toggle dropdown-toggle-{$level}" role="button" data-toggle="dropdown" aria-haspopup="false" aria-expanded="false")
                    i.fa.mr-1(class="{$menu.icon|default='fa-book'}")
                    span {$menu.name}
        form.form-inline.my-2
            input.form-control.mr-2.w-auto(type="search" placeholder="点击搜索" aria-label="Search")
            button.btn.btn-outline-secondary.my-2.my-sm-0(type="submit") 搜索
